using System;

namespace BSpec.Conventions
{
    public class NamingConvention
    {
        static NamingConvention()
        {
            new DefaultNamingConvention();
        }

        public static SpecificationElementConvention Concern { get; private set; }
        public static SpecificationElementConvention Scenario { get; private set; }
        public static SpecificationElementConvention Context { get; private set; }
        public static SpecificationElementConvention Behaviour { get; private set; }

        public NamingConvention WithConcerns(Func<SpecificationElementConvention, SpecificationElementConvention> convention)
        {
            Concern = convention(new SpecificationElementConvention());
            return this;
        }

        public NamingConvention WithScenarios(Func<SpecificationElementConvention, SpecificationElementConvention> convention)
        {
            Scenario = convention(new SpecificationElementConvention());
            return this;
        }

        public NamingConvention WithContexts(Func<SpecificationElementConvention, SpecificationElementConvention> convention)
        {
            Context = convention(new SpecificationElementConvention());
            return this;
        }

        public NamingConvention WithBehaviours(Func<SpecificationElementConvention, SpecificationElementConvention> convention)
        {
            Behaviour = convention(new SpecificationElementConvention());
            return this;
        }
    }
}